﻿Imports Microsoft.VisualBasic
Public Class AccountsSP
    Inherits DBParentStoredProcedureClass

    Public Operation As New TableField("Operation", Data.SqlDbType.NVarChar)
    Public AccountNo As New TableField("AccountNo", Data.SqlDbType.NVarChar)
    Public AccountNameAr As New TableField("AccountNameAr", Data.SqlDbType.NVarChar)
    Public AccountNameEn As New TableField("AccountNameEn", Data.SqlDbType.NVarChar)
    Public ParentID As New TableField("ParentID", Data.SqlDbType.NVarChar)
    Public Remarks As New TableField("Remarks", Data.SqlDbType.NVarChar)
    Public AccountType As New TableField("AccountType", Data.SqlDbType.Int)

    Sub New()
        MyBase.StoredProcedureName = "AccountsSP"
    End Sub

    Public Shadows Function QueryDatabase(ByVal QueryType As SqlQueryType, _
                                 Optional ByVal Operation As String = "", _
                                 Optional ByVal AccountNo As String = "", _
                                 Optional ByVal AccountNameAr As String = "", _
                                 Optional ByVal AccountNameEn As String = "", _
                                 Optional ByVal ParentID As String = "", _
                                 Optional ByVal Remarks As String = "", _
                                 Optional ByVal AccountType As String = "") As Object
        MyBase.FieldsArrayList = New ArrayList
        Me.Operation.SetValue(Operation, MyBase.FieldsArrayList)
        Me.AccountNo.SetValue(AccountNo, MyBase.FieldsArrayList)
        Me.AccountNameAr.SetValue(AccountNameAr, MyBase.FieldsArrayList)
        Me.AccountNameEn.SetValue(AccountNameEn, MyBase.FieldsArrayList)
        Me.ParentID.SetValue(ParentID, MyBase.FieldsArrayList)
        Me.Remarks.SetValue(Remarks, MyBase.FieldsArrayList)
        Me.AccountType.SetValue(AccountType, MyBase.FieldsArrayList)

        Return MyBase.QueryDatabase(QueryType)
    End Function


End Class
